<?php

namespace App\Http\Requests;

use App\Http\Requests\Request;

class ZtcStatisticRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $rules = [
            'type'       => 'required',
            'begin_time'     => 'required',
            'end_time'    => 'required',
        ];



        return $rules;

    }

    public function attributes()
    {
        $attributes = array(
            'type'       => '类型',
            'begin_time'     => '开始时间',
            'end_time'    => '结束时间',
        );

        return $attributes;
    }

    public function messages()
    {
        $messages = [
            'required'           => ':attribute必须为必填项',
        ];

        return $messages;
    }
}
